from minio import Minio
import os
from config import repo_config
class RepoUploader:
    def __init__(self):
        self.client=Minio(endpoint=repo_config.endpoint,access_key=repo_config.user,secret_key=repo_config.pwd,secure=False)

    def upload_object(self,file, bucket,object_name):
        if not os.path.exists(file):
            return
        self.client.fput_object(bucket,object_name,file)

if __name__=="__main__":
    uploader=RepoUploader()
    print("test")